package com.dhy.service.imp;

import com.dhy.dto.PermissionDto;
import com.dhy.mapper.PermissionMapper;
import com.dhy.pojo.Permission;
import com.dhy.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements IPermissionService {

    @Autowired
    PermissionMapper permissionMapper;

    //通过权限名搜索权限
    public Permission selectByName(String name){
        return permissionMapper.selectByName(name);
    }

    @Override
    public void batchInsert(List<Permission> permissionList) {

    }

    @Override
    public List<PermissionDto> selectPermissionTree() {
        return permissionMapper.selectPermissionTree();
    }
}
